scale: Document interaction between rounding and autoscrolling
authorMatthias Clasen <mclasen@redhat.com>
Wed, 24 Aug 2016 16:58:54 +0000 (12:58 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 24 Aug 2016 16:58:54 +0000 (12:58 -0400)
This is a bit of a gotcha, so better document it.

gtk/gtkscale.c

index 895438cb85d6b2517f4765ffc04b6d423c96cc45..6ae18444748ddb56af5bbbafa819dbe0ba10f790 100644 (file)
@@ -1116,6 +1116,11 @@ gtk_scale_new_with_range (GtkOrientation orientation,
  * Sets the number of decimal places that are displayed in the value.
  * Also causes the value of the adjustment to be rounded off to this
  * number of digits, so the retrieved value matches the value the user saw.
+ *
+ * Note that rounding to a small number of digits can interfere with
+ * the smooth autoscrolling that is built into #GtkScale. As an alternative,
+ * you can use the #GtkScale::format-value signal to format the displayed
+ * value yourself.
  */
 void
 gtk_scale_set_digits (GtkScale *scale,